#!/usr/bin/perl -wT

use strict;

use CGI;
use HTML::Template;

&main();

sub main() {
	my $q = new CGI;
	my $template = "../templates/bjs.tmpl";
	my $tmpl = new HTML::Template(filename => $template);

	print $q->header(-type => 'text/plain', -charset => 'utf-8');

	my $s = $q->param("s") || "";   # user code, secure
	my $d = $q->param("d") || "";   # 0~999, milliseconds
	my $hl = $q->param("hl") || ""; # language
    my $c = $q->param("c") || 0;
    $tmpl->param(c => $c);
	$tmpl->param(s => $s);
	$tmpl->param(d => $d);
	$tmpl->param(hl => $hl);

	print $tmpl->output;
}
